/**
 * Created by Administrator on 2016/7/13.
 */
"use strict";
swan_pc
    .controller("LookOverController",function($scope,getMyFriend,getClipByLoginId,$state){
        $scope.clipAddChangeFlag=false;
        $scope.MyFriend=[];
        $scope.inputUserName="";
        $scope.inputClipName="";
        $scope.LookOrYue=true;
        $scope.ActiveLi=-1;
        $scope.changeActiveLi=function(option){
            $scope.ActiveLi=option;
            }
        $scope.changeLookOrYue=function(){
            $scope.LookOrYue=$scope.LookOrYue?false:true;
        }
        $scope.init=function(){
            getMyFriend.query(function(result){
                $scope.MyFriend=result;
            })
        }
        $scope.init();
        $scope.userClipList=[];
        $scope.userClipListShowFlag=null;
        $scope.userClipListShow=function(loginId,flag){
            //console.log("FriendLoginId:"+loginId);
            $scope.persentLoginId=loginId;
            $scope.userClipListShowFlag=flag;
            getClipByLoginId.query({login: loginId},
                function (result) {
                    $scope.userClipList = result;
                },
                function (result) {
                }
            )
            $state.go("lookoverusercliplist");
        }
        $scope.userClipShow=function(loginId,flag){
            //console.log("FriendLoginId:"+loginId);
            $scope.persentLoginId=loginId;
            $scope.userClipListShowFlag=flag;
            getClipByLoginId.query({login:loginId},
                function(result){
                    $scope.userClipList=result;
                },
                function(result){
                }
            )
            //console.log("$scope.userClipList:");
            //console.log($scope.userClipList);
            $state.go("lookoveruserclip");
        }

    })